package School;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-10-25
 * Time: 8:39
 */
public class E {
    // 数据成员
    private String name;
    private int serviceYears;
    private double salary;
    private double bonus;

    // 构造方法
    public E(String name, int serviceYears, double salary, double bonus) {
        this.name = name;
        this.serviceYears = serviceYears;
        this.salary = salary;
        this.bonus = bonus;
    }

    // 成员方法 is_OK()
    public void is_OK() {
        if (bonus >= 3000) {
            System.out.println(name + " 的奖金达标");
        } else {
            System.out.println(name + " 的奖金不达标");
        }
    }

    // Getter 和 Setter 方法（可选）
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getServiceYears() {
        return serviceYears;
    }

    public void setServiceYears(int serviceYears) {
        this.serviceYears = serviceYears;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
}